<!-- 待收来电 > 仅转发-->
<template>
  <view>
    <van-popup v-model="showCompo" closeable round position="bottom" :style="{ height: '100%' }"
               @click-close-icon="toClose" @click-overlay="toClose">
      <van-row type="flex" justify="center">
        <van-col offset="1" span="8">
          <van-cell value="仅转发"/>
        </van-col>
      </van-row>
      <van-form @submit="onSubmit">
        <van-cell-group inset>
          <van-field v-model="formData.title" name="title" label="标题" placeholder="请输入内容" input-align="right"
                     :rules="[{ required: true, message: '请填写标题' }]"/>

<!--          <van-cell title="呈送领导" :value="formData.csldToName" is-link @click="showCsldSheet"/>-->
<!--          <csld :showCsld="showCsld" :dataList="csldList" @closeCsldSheet="closeCsldSheet"></csld>-->

          <van-cell title="发往" :value="formData.mainToName" is-link @click="showOrgTreeSheet('mainTo')"/>
          <!-- forwardType:mainTO：主办，copyTo：抄送 -->
          <orgTree :showOrgTree="showOrgTreeMain" :nodeData="nodeDataMain" forwardType="mainTo"
                   @closeOrgTreeSheet="closeOrgTreeSheet"></orgTree>

          <van-cell title="抄送" :value="formData.copyToName" forwardType="copyTo" is-link
                    @click="showOrgTreeSheet('copyTo')"/>
          <orgTree :showOrgTree="showOrgTreeCopy" :nodeData="nodeDataCopy" forwardType="copyTo"
                   @closeOrgTreeSheet="closeOrgTreeSheet"></orgTree>

          <van-field v-model="formData.otherUnit" name="otherUnit" label="其他单位" placeholder="清输入内容"
                     input-align="right"/>

          <van-cell required is-link title="等级" :value="formData.emergencyLevelName" @click="showEmergency = true"/>
          <van-action-sheet v-model="showEmergency" :actions="emergencySelect" cancel-text="取消"
                            @select="onSelectElergency"/>

          <van-cell is-link title="重要电报" :value="formData.attentionStatusName"
                    @click="showAttention = true"/>
          <van-action-sheet v-model="showAttention" :actions="attentionSelect" cancel-text="取消"
                            @select="onSelectAttention"/>

          <van-cell is-link title="文种" :value="this.dict.getDictNameByDictCode('swLanguage',formData.language)" @click="showLanguage = true"/>
          <van-action-sheet v-model="showLanguage" :actions="languageSelect" cancel-text="取消"
                            @select="onSelectLanguage"/>

          <van-cell is-link title="内容" :value="this.dict.getDictNameByDictCode('content',formData.sdContent)" @click="showContent = true"/>
          <van-action-sheet v-model="showContent" :actions="contentSelect" cancel-text="取消"
                            @select="onSelectContent"/>

          <van-field v-model="sdh" name="sdh" label="发电号" readonly input-align="right"/>

          <view class="opinion">
            <text class="opinion-left">预计发号</text>
            <view class="opinion-right">
              <text>{{ formData.fdWord }}</text>
              <text>〔{{ formData.fdYear }}〕</text>
              <text>{{ formData.fdNum }}号</text>
            </view>
          </view>

          <van-field v-model="formData.drafteTime" readonly label="拟稿日期" placeholder="点击选择日期"
                     @click="showPopFn" input-align="right"/>
          <van-popup v-model="showPop" round position="bottom" :style="{ height: '40%' }">
            <van-datetime-picker v-model="currentDate" type="datetime" @change="changeFn()"
                                 @confirm="confirmFn()" @cancel="cancelFn()"/>
          </van-popup>

          <!-- TODO 样式需根据原型调整 -->
          <van-cell>
            <van-row type="flex">
              <van-col span="6" class="box-input">
                <span>份数/页数</span>
              </van-col>
              <van-col span="6" class="box-input">
                共<input class="piban-input" type="digit" v-model="formData.approvePart"/>份,
              </van-col>
              <!-- <van-col span="6" class="box-input">
              转发<input class="piban-input" type="digit" v-model="formData.forwardPart"/>份,
          </van-col> -->
              <van-col span="6" class="box-input">
                每份<input class="piban-input" type="digit" v-model="formData.eachPage"/>页
              </van-col>
            </van-row>
          </van-cell>


          <van-field v-model="formData.signDept" name="signDept" label="落款单位" input-align="right"/>

          <van-cell title="拟稿人" :value="formData.drafterName" @click="showDrafterSheet" is-link/>
          <drafter :showDrafter="showDrafter" :nodeData="nodeDataDrafter" :drafterData="drafterData"
                   @closeDrafterSheet="closeDrafterSheet"></drafter>

          <van-field v-model="formData.draftePhone" name="draftePhone" label="电话" input-align="right"/>

          <!-- 转发里无此项 -->
          <van-cell title="拟稿单位" :value="formData.drafterDeptName" forwardType="copyTo" is-link
                    @click="showOrgTreeSheet('drafterDept')"/>
          <orgTree :showOrgTree="showOrgTreeDraftDept" :nodeData="nodeDataForward" forwardType="drafterDept"
                   @closeOrgTreeSheet="closeOrgTreeSheet"></orgTree>

          <van-field v-model="formData.registerName" name="registerName" label="登记人" readonly
                     input-align="right"/>
<!--          <van-field v-model="formData.taskNumber" name="taskNumber" label="任务编号" placeholder="任务编号"/>-->
          <van-field v-model="formData.remark" rows="3" autosize label="备注" type="textarea" placeholder=""
                     clearable input-align="right"/>
          <view class="opinion">
            <text class="opinion-left">发送件</text>
            <view class="opinion-right" v-if="this.util.isNotEmpty(detailBody.all)">
              <!--							<text v-for="(item,index) in detailBody.doc">{{item.attachName}}</text>-->
              <text v-for="(item,index) in detailBody.all" @click="lx.openFile(item, formData.annexId)"
                    class="text-blue">{{ formData.title }}
              </text>
            </view>
          </view>
          <view class="opinion">
            <text class="opinion-left">附件</text>
            <view class="opinion-right" v-if="detailAttachment.length>0">
              <!--							<text v-for="(item,index) in detailAttachment">{{item.attachName}}</text>-->
              <text v-for="(item,index) in detailAttachment" class="text-blue"
                    @click="lx.openFile(item, formData.annexId)">{{item.attachName}}
              </text>
            </view>
          </view>


        </van-cell-group>
        <view style="margin: 40rpx;height: 160rpx;">
          <van-row type="flex" justify="space-around">
            <van-col span="10">
              <van-button type="info" round plain hairline block @click.prevent="toClose">取消</van-button>
            </van-col>
            <van-col span="10">
              <van-button type="info" round block native-type="submit">确定</van-button>
            </van-col>
          </van-row>
        </view>

      </van-form>
    </van-popup>
  </view>
</template>

<script>
import csld from 'pages/caac/components/receiveMsgDoc/compo-csld'; //呈送领导选择组件
import orgTree from 'pages/caac/components/receiveMsgDoc/compo-orgtree'; //主办组件
import drafter from 'pages/caac/components/receiveMsgDoc/compo-drafter';//拟稿人选择
export default {
  components: {
    csld,
    orgTree,
    drafter
  },
  props: {
    showForward: {
      type: Boolean,
      default: false
    },
  },
  data() {
    return {
      showCsld: false, //呈送领导选择组件
      showCompo: false, //组件是否显示
      showDrafter: false,//拟稿人组件

      csldList: [], //呈送领导list
      csldName: [], //选中的呈送领导，以逗号分割
      csldId: [], //选中的呈送领导id，以逗号分割

      // approveToName:'',//回显的批办人名称，因表单中不存在name字段
      approveName: [], //选中的批办人，以逗号分割
      approveTo: [], //选中的批办人id，以逗号分割

      showOrgTreeMain: false, //主办组件显示
      showOrgTreeCopy: false, //抄送组件显示
      showOrgTreeForward: false, //转发单位显示
      showOrgTreeDraftDept: false, //拟稿单位显示

      //发往显示所有组织
      nodeDataMain: {
        showNode: '', //显示的节点
        hideNode: '', //隐藏的节点
      },
      //抄送只显示民航局
      nodeDataCopy: {
        showNode: '', //显示的节点
        hideNode: '', //隐藏的节点
      },
      //拟稿单位
      nodeDataForward: {
        showNode: '',
        hideNode: ''
      },
      //拟稿人选择，查询单位所需节点和隐藏节点
      nodeDataDrafter: {
        showNode: '',
        hideNode: ''
      },
      //拟稿人信息，串回子组件回显用
      drafterData: {
        userName: '',
        userId: ''
      },
      sdh: '(系统生成)',
      formData: {
        "annexId": "",
        "onceAnnexId": "",
        "fdId": "",
        "bizType": "",
        "proInstId": "",
        "officeId": "",
        "formSdStatus": "",
        "completeTime": "",
        "approvePart": "",
        "fdDeptName": "",
        "draftStatus": "",
        "psfsDept": "",
        "approveTo": "",
        "approveToName": "",
        "attentionStatus": "", //重要电报1-是，0-否
        "attentionStatusName": "",
        "remark": "",
        "title": "",
        "mainTo": "",
        "mainToName": "",
        "copyTo": "",
        "copyToName": "",
        "forwardUnit": "",
        "forwardUnitName": "",
        "forwardPart": "",
        "updateId": "",
        "draftePhone": "", //电话
        "drafterDeptId":"",
        "drafterDeptName":"",
        "eachPage": "",
        "signDept": "",
        "emergencyLevel": "",
        "emergencyLevelName": "",
        "registerId": "",
        "registerName": "", //登记人
        "sdTime": "",
        "approvalId": "",
        "approvalTime": "",
        "parentBizId": "",
        "parentBizType": "",
        "forwardStatus": "",
        "sdWord": "",
        "sdYear": "",
        "sdNum": "",
        "approvalStatus": "",
        "importStatus": "", //处理分类--紧急重要需加急办理
        "fdWord": "",
        "fdYear": "",
        "fdNum": "",
        "leaderType": "",
        // "proInstId": "",
        "otherUnit": "",
        "createTime": "",
        "csldTo": "",
        "csldToName": "",
        "archiveStatus": "",
        "delStatus": "",
        "sdId": "",
        "sendStatus": "",
        "deleterId": "",
        "deleteTime": "",
        "drafterId": "", //拟稿人id
        "drafterName": "", //拟稿人
        "drafteTime": "",
        "status": "",
        "taskNumber": '',
        "language":'',
        "sdContent":'',
        "fromSdStatus":''
      },
      detailBody: {}, //正文
      detailAttachment: [], //附件
      //字典相关
      showEmergency: false, //等级
      dictEmergencyLevel: [],
      emergencySelect: [],
      showLanguage: false,
      languageSelect: [],
      showContent: false,
      contentSelect: [],
      showAttention: false, //重要电报
      attentionSelect: [{
        "name": "否",
        "dictItemCode": 0
      },
        {
          "name": "是",
          "dictItemCode": 1
        }
      ],
      showCalendar: false,
      value: '',
      result: [], //处理分类复选框选中的值
      showPop: false,
      currentDate: new Date(),
      changeDate: new Date(),
      wfmData: {}, //提交返回的参数，调用listNextActivity接口
      //uuid 和sdId 接口 caac/oa/doc/hbglj/fdpengding/registerType用
      uuid: '', //
      sdId: '',

    }
  },
  mounted() {
    //赋值
    this.initFormData()
    this.getDict() //初始化字典
    this.fdword() //获取发电字头
    this.approveinfo() //获取呈送领导和批办人
    this.cuserdept()
  },
  watch: {
    showForward(val) {
      this.showCompo = val
    },
  },
  methods: {
    //表单数据初始化
    initFormData() {
      this.formData.bizType = 'hbgljsd'
      this.formData.approvePart = '1'
      // this.formData.draftStatus = '2'
      this.formData.attentionStatus = '0' //重要电报：1-是，0-否
      this.formData.attentionStatusName = '否'
      this.formData.forwardPart = '0'
      this.formData.eachPage = '1'
      this.formData.emergencyLevel = 'pj'
      this.formData.emergencyLevelName = '平急'
      this.formData.registerName = this.cache.get("userInfo").userName
      this.formData.registerId = this.cache.get("userInfo").userId
      this.formData.sdTime = this.util.timeFormatYYYYMMDDHHMMSS(new Date())
      this.formData.drafteTime = this.util.timeFormatYYYYMMDDHHMMSS(new Date())
      this.formData.sdYear = this.dict.getCurrentYear()
      this.formData.fdYear = this.dict.getCurrentYear()
      this.formData.createTime = this.util.timeFormatYYYYMMDDHHMMSS(new Date())
    },
    toggle() {
      if (this.result.length > 0) {
        this.formData.importStatus = 1
      } else {
        this.formData.importStatus = 0
      }
    },
    showPopFn() {
      this.showPop = true
    },
    //等级
    onSelectElergency(item) {
      this.formData.emergencyLevel = item.dictItemCode
      this.formData.emergencyLevelName = item.name
      this.showEmergency = false;
    },
    // 文种
    onSelectLanguage(item) {
      this.formData.language = item.dictItemCode
      this.showLanguage = false;
    },
    // 内容
    onSelectContent(item) {
      this.formData.sdContent = item.dictItemCode;
      this.showContent = false;
    },
    //重要电报
    onSelectAttention(item) {
      this.formData.attentionStatus = item.dictItemCode
      this.formData.attentionStatusName = item.name
      this.showAttention = false
    },
    //显示呈送领导组件
    showCsldSheet() {
      this.showCsld = true
    },
    //关闭呈送领导组件（子组件调用）
    closeCsldSheet(result) {
      //result 为子页面传回来的选中的人的数组[{"userId":"10701","userCode":"chenguangcheng_hb","userName":"陈广承","sex":"1","sort":21,"birthday":null,"secretLevel":null,"officePhone":null,"mobilePhone":"13701208132","fax":null,"email":"chenguangcheng_hb@caac.net","zwId":null,"directLeader":null,"idCard":null,"theme":null,"extend1":"002001026","extend2":null,"extend3":null,"extend4":null,"extend5":null,"extend6":"10701","extend7":null,"extend8":null,"extend9":null,"extend10":null,"isValid":"1","createUser":"CAAC_SYSTEM","createTime":"2021-07-27T12:30:00.011+0000","updateUser":"CAAC_SYSTEM","updateTime":"2021-09-02T02:25:00.010+0000"}]
      //重新选择后置空数组，防止重复显示
      this.csldName = []
      this.csldId = []
      if (this.util.isNotEmpty(result)) {
        result.forEach((item) => {
          this.csldName.push(item.userName)
          this.csldId.push(item.userId)
        })
      }
      //赋值回显，以逗号分割
      this.formData.csldToName = this.csldName.toString()
      this.formData.csldTo = this.csldId.toString()
      this.showCsld = false //关闭
    },

    //主办抄送转发单位
    showOrgTreeSheet(type) {
      if (type == 'mainTo') {
        this.showOrgTreeMain = true
        this.nodeDataMain.showNode = ''
      } else if (type == 'copyTo') {
        this.showOrgTreeCopy = true
      } else if (type == 'forward') {
        this.showOrgTreeForward = true
      } else { //type=='drafterDept'
        this.showOrgTreeDraftDept = true
      }
    },
    //拟稿人
    showDrafterSheet() {
      this.showDrafter = true
    },
    /**
     * 子组件调用，通知父组件关闭当前子组件
     * @param {Object} orgInfo 选中的数组对象
     * forwardType   mainTo：主办，copyTo：抄送,forward:转发单位
     * {forwardType:this.forwardType,orgName:this.deptName.toString(),deptCode:this.deptCode.toString()}
     */
    closeOrgTreeSheet(orgInfo) {
      if (this.util.isNotEmpty(orgInfo.forwardType)) {
        if (orgInfo.forwardType == 'mainTo') { //发往
          this.formData.mainToName = ''
          this.formData.mainTo = ''
          if (this.util.isNotEmpty(orgInfo.deptCode)) {
            this.formData.mainToName = orgInfo.orgName
            this.formData.mainTo = orgInfo.deptCode
          }
          this.nodeDataCopy.hideNode=orgInfo.deptCode
          this.showOrgTreeMain = false
        } else if (orgInfo.forwardType == 'copyTo') { //抄送
          this.formData.copyToName = ''
          this.formData.copyTo = ''
          if (this.util.isNotEmpty(orgInfo.deptCode)) {
            this.formData.copyToName = orgInfo.orgName
            this.formData.copyTo = orgInfo.deptCode
          }
          this.showOrgTreeCopy = false
        } else if (orgInfo.forwardType == 'forward') {
          this.formData.forwardUnitName = ''
          this.formData.orwardUnit = ''
          if (this.util.isNotEmpty(orgInfo.deptCode)) {
            this.formData.forwardUnitName = orgInfo.orgName
            this.formData.forwardUnit = orgInfo.deptCode
          }
          this.showOrgTreeForward = false
        } else { //if(orgInfo.forwardType == 'drafterDept')
          this.formData.drafterDeptName = ''
          this.formData.drafterDeptId = ''
          if (this.util.isNotEmpty(orgInfo.deptCode)) {
            this.formData.drafterDeptName = orgInfo.orgName
            this.formData.drafterDeptId = orgInfo.deptCode
          }
          this.showOrgTreeDraftDept = false
        }
      }
    },
    //关闭拟稿人组件
    closeDrafterSheet(userInfo) {
      this.formData.drafterId = userInfo.userId
      this.formData.drafterName = userInfo.userName
      this.showDrafter = false
    },
    onSubmit() {
      //校验-请在批办、主办、抄送、局领导、其他单位、转发单位中至少选择一个
      if (this.util.isEmpty(this.formData.csldTo) && this.util.isEmpty(this.formData.approveTo) &&
              this.util.isEmpty(this.formData.mainTo) && this.util.isEmpty(this.formData.copyTo) &&
              this.util.isEmpty(this.formData.otherUnit) && this.util.isEmpty(this.formData.forwardUnit)) {
        this.$toast('请在发往、抄送、其他单位、或程送领导中至少选择一个！')
        return
      } else {
        this.save()
//        console.log("this.formData: " + JSON.stringify(this.formData));
      }
    },

    //转发
    save() {
      this.formData.proInstId = ''
      this.$httploading({
        url: this.$http.adornUrl(`/caac/oa/doc/fd`),
        method: 'post',
        params: {
          'systemKey': this.cache.get('userInfo').systemKey, //固定值
          'systemFlag': this.cache.get('userInfo').systemFlag, //固定值
        },
        data: this.formData,
      }).then(({ data }) => {
        console.log("提交保存结果-->>: " + JSON.stringify(data));
        if (data.code == 200) {
          this.forwardType()
          uni.redirectTo({
            url: '/pages/caac/receiveMsg/receive-call'
          })
        } else {
          this.$toast(data.message + ' code:' + data.code)
        }
      })

    },
    forwardType() {
      this.$httploading({
        url: this.$http.adornUrl(`/caac/oa/doc/fdpengding/forwardType`),
        method: 'post',
        params: {
          'systemKey': this.cache.get('userInfo').systemKey, //固定值
          'systemFlag': this.cache.get('userInfo').systemFlag, //固定值
        },
        data: this.uuid
      }).then(({ data }) => {
        if (data.code == 200) {
          this.$toast("操作成功")
        } else {
          this.$toast(data.message + ' code:' + data.code)
        }
      })
    },

    //取消按钮
    toClose() {
      this.$emit('closeForward', '');
    },
    //获取呈送领导和批办人
    approveinfo() {
      var _this = this
      this.$http({
        url: this.$http.adornUrl(`/caac/oa/doc/hbglj/sd/approveinfo`),
        method: 'get',
        params: this.$http.adornParams({
          'systemKey': this.cache.get('userInfo').systemKey, //固定值
          'systemFlag': this.cache.get('userInfo').systemFlag, //固定值
        })
      }).then(({
                 data
               }) => {
        //data: {"code":200,"data":{"csld":[],"approve":[]},"message":null}
        console.log("获取呈送领导和批办人-->data: " + JSON.stringify(data));
        if (data.code == 200) {
          if (this.util.isNotEmpty(data.data)) {
            this.csldList = data.data.csld
          } else {
            this.$toast('未获取到人员信息，请联系管理员！')
          }
        }


      })
    },
    //父组件点击登记时调用获取详情回显到表单
    getDetail(fdId, uuid) {
      console.log("fdId: " + fdId + ",uuid:" + uuid);
      this.uuid = uuid
      var _this = this
      this.$httploading({
        url: this.$http.adornUrl(`/caac/oa/doc/sendinfo/listinfo/` + fdId),
        method: 'get',
        params: this.$http.adornParams({
          'systemKey': this.cache.get('userInfo').systemKey, //固定值
          'systemFlag': this.cache.get('userInfo').systemFlag, //固定值
        })
      }).then(({ data }) => {
//        console.log("获取收电详情--data: " + JSON.stringify(data));
        if (data.code == 200) {
          this.getCaacBody(data.data.annexId) //获取发送件
          this.getCaacAttachment(data.data.annexId) //获取附件数据
          //给formData赋值，回显
          for (let item in this.formData) {
            for (let item2 in data.data) {
              if (item2 == item) {
                this.formData[item] = data.data[item2]
              }
            }
          }
          this.drafterData.userId = this.formData.drafterId
          this.drafterData.userName = this.formData.drafterName
//          console.log("this.formData: " + JSON.stringify(this.formData));

        }
      })
    },
    //获取发送件
    getCaacBody(annexId) {
      this.$http({
        url: this.$http.adornUrl(`/caac/oa/component/maintext/proInstId/` + annexId),
        method: 'get',
        params: this.$http.adornParams({
          'systemKey': this.cache.get('userInfo').systemKey, //固定值
          'systemFlag': this.cache.get('userInfo').systemFlag, //固定值
        })
      }).then(({ data }) => {
        if (data.code == 200) {
          this.detailBody = data.data
        }
      })
    },
    //获取附件数据
    getCaacAttachment(annexId) {
      this.$http({
        url: this.$http.adornUrl(`/caac/oa/component/attachmentupload/attachmentinfo`),
        method: 'get',
        params: this.$http.adornParams({
          'bizId': annexId,
          'attachTypeId': 'pageBody_uploadFile',
          'systemKey': this.cache.get('userInfo').systemKey, //固定值
          'systemFlag': this.cache.get('userInfo').systemFlag, //固定值
        })
      }).then(({ data }) => {
        if (data.code == 200) {
          this.detailAttachment = data.data
        }
      })
    },

    //获取发电头
    fdword() {
      var _this = this
      this.$http({
        url: this.$http.adornUrl(`/caac/oa/doc/hbjgj/fd/fdword`),
        method: 'get',
        params: this.$http.adornParams({
          'systemKey': this.cache.get('userInfo').systemKey, //固定值
          'systemFlag': this.cache.get('userInfo').systemFlag, //固定值
          'type': 'fd', //固定值
          // 'systemFlag': 'yidong'//固定值
        })
      }).then(({
                 data
               }) => {
        //{"code":200,"data":{"fdWord":"华北局收眀电","message":"查询成功!"},"message":null}
        console.log("获取发电头--data: " + JSON.stringify(data));
        if (data.code == 200) {
          this.formData.fdWord = data.data.fdWord
          // this.sdwordnum()
        }
      })
    },
    //获取需要的字典项
    getDict() {
      this.dictSecrecyLevel = this.cache.get('mj') //密级
      //给van-action-sheet 赋值
      this.mj = []
      this.dictSecrecyLevel.forEach((item) => {
        this.mj.push({
          name: item.dictItemName,
          dictItemCode: item.dictItemCode
        })
      })

      this.dictEmergencyLevel = this.cache.get('dbjjcd') //等级
      this.emergencySelect = []
      this.dictEmergencyLevel.forEach((item) => {
        this.emergencySelect.push({
          name: item.dictItemName,
          dictItemCode: item.dictItemCode
        })
      })

      const dictContent = this.cache.get('content') //内容
      this.contentSelect = []
      dictContent.forEach((item) => {
        this.contentSelect.push({name: item.dictItemName, dictItemCode: item.dictItemCode})
      })

      const dictLanguage = this.cache.get('swLanguage') //文种
      this.languageSelect = []
      dictLanguage.forEach((item) => {
        this.languageSelect.push({name: item.dictItemName, dictItemCode: item.dictItemCode})
      })
    },

    changeFn() { // 值变化是触发
      this.changeDate = this.currentDate // Tue Sep 08 2020 00:00:00 GMT+0800 (中国标准时间)
    },
    confirmFn() { // 确定按钮
      this.formData.drafteTime = this.util.timeFormatYYYYMMDDHHMMSS(this.currentDate)
      this.showPop = false
    },
    cancelFn() {
      this.showPop = false;
    },
    //获取当前用户所在的处室信息
    cuserdept() {
      this.$http({
        url: this.$http.adornUrl(`/caac/oa/comm/comm/cuserdept`),
        method: 'get',
        params: this.$http.adornParams({
          'systemKey': this.cache.get('userInfo').systemKey,//固定值
          'systemFlag': this.cache.get('userInfo').systemFlag,//固定值
        })
      }).then(({data}) => {
        if (data.code == 200) {
          if (this.util.isNotEmpty(data.data)) {
            this.nodeDataMain.showNode = data.data.deptCode
            this.nodeDataCopy.showNode = data.data.deptCode
            this.nodeDataForward.showNode = data.data.deptCode
          }
        }
      })
    },

  },
}
</script>

<style scoped>
	/* 意见相关样式 */
	.opinion {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		margin: 0 32rpx;
		padding: 20rpx 0rpx;
		overflow: hidden;
		font-size: 28rpx;
		line-height: 24px;
		border-bottom: 1px solid #ebedf0;

	}

	.opinion .opinion-left {
		text-align: left;
		color: #323233;
	}

	.opinion .opinion-right {
		text-align: right;
		color: #969799;
	}

	/* 修改复选框文字颜色 */
	/deep/ .van-checkbox__label {
		color: #969799;
	}

	/deep/ .van-field__control--right {
		color: #969799;
	}

	/deep/ .van-cell__title {
		min-width: 10%;
	}

	.box-input {
		display: flex;
		flex-direction: row;

		width: 25%;
	}

	.piban-input {
		display: inline;
		width: 35%;
		height: 100%;
		padding-left: 8rpx;
		border: 1rpx solid #ccc;
	}
</style>
